const express = require('express');
const router = express.Router()

const { getEvaluateList, searchEvaluate, deleteEvaluate } = require('../../controller/apis/EvaluateController');
// 导入JWT拦截中间件
const checkTokenMiddleware = require('../../middleware/checkTokenMiddleware')
// 导入分页中间件
const paginationMiddleware = require('../../middleware/paginationMiddleware');

// 获取评价列表信息
router.get('/evaluate/list', paginationMiddleware, checkTokenMiddleware, getEvaluateList)

// 评价列表搜索功能
router.get('/evaluate/search', checkTokenMiddleware, searchEvaluate)

// 删除评论
router.delete('/evaluate/del/:id', deleteEvaluate)

module.exports = router